Welcome for Computer Graphics.
So in this week we will speak about rasterization.
So I introduced last week I think the major questions that we will look into.
In particular we started with 2D graphics and in fact also today we will look at 2D
lines but yeah as you might imagine if you take a 3D line and you map it to a 2D image
it still is a line.
So rasterization in 2D and 3D will be rather similar and so we will look into yeah rasterization.
Today we will see how we can rasterize lines and on Thursday then we will see how to also
fill objects and in particular we will decompose everything into triangles and then rasterize
these or arbitrary polygons.
This is what we will look into tomorrow on Thursday and today we look at lines.
So yeah these are the two main problems I would say in rasterization of course.
You can also define other ones but these are probably the most basic ones.
Later on we will mainly look into triangles.
So if we render filled objects we decompose them into triangles and then we have the challenge
to rasterize such a triangle and rasterization in that sense now means given a triangle with
three vertices how can we enumerate all the pixels that are within that triangle?
Yeah because if we want to rasterize it we have to find all these pixels in here and
we somehow have to enumerate them and of course that needs to be very fast.
Rasterization is always the major problem with these rasterization things because you
need to imagine for a computer game for instance where you want to have 60 images, 60 new images
per second.
Every image consists of 2 million pixels for instance and you want to render a scene that
contains 10 million triangles.
It's a very very very large number of pixels that you need to enumerate and you need the
most efficient algorithm possible to do that so that you can achieve real-time rendering.
And ideally the algorithm should be so simple that it can also be well implemented in hardware
and yeah in fact this is also the case.
Normally if you do graphics you always have a little special processor in your computer
even on mobile phones.
These are available today or standard today so it's special processors that mainly do
graphics and they all contain these algorithms inside so that they do that very efficiently
in hardware.
And this is for triangle and today we will look at the maybe more simpler case how to
rasterize a line.
And yeah even though these algorithms as I said are usually implemented in hardware or
already by some library it definitely makes sense to know how they work because there
are always problems that are very similar and yeah it's always good to understand what
happens under the engine so that we can control that better.
We will come back to that later when we learn how to program OpenGL.
Then we will see that it's important to understand how at least the idea of these algorithms
is so that we can also apply OpenGL.
So lines are very widely used to display cut models so if you're generating plans or things
like that construction drawings then usually this happens using lines so here we can see
an example of I think it's an engine and yeah this is a complex 3D model and in that case
to also see details in from the inside so that nothing is hidden this is rendered using
lines and all the objects are rendered by their outline.
So this would be an example where we need to render lines or to rasterize lines.
We've also seen examples last week when I've shown you this path primitive for instance
and I also told you that even if these paths can contain curves or what we think is curves
Presenters
Zugänglich über
Offener Zugang
Dauer
01:10:56 Min
Aufnahmedatum
2019-10-21
Hochgeladen am
2019-10-28 12:49:03
Sprache
de-DE